package com.param.util;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.param.dto.DictDto;

public class ParamConstants {
	public static final String LOGIN_URL = "http://{0}/devapi/v1/basic/key";
	public static final String SERVER_URL = "http://{0}/devapi/v1/basic/systemparam?type=MDVR-MCMS,MDVR-PSI&pwenc=1&_=1670286846139";
	public static final String PORT_URL = "http://{0}/devapi/v1/basic/systemparam?type=MDVR-PSS,MDVR-PEN,MDVR-SPCS&pwenc=1&_=1670306833124";
	public static final String PORTALARM_URL = "http://{0}/devapi/v1/basic/systemparam?type=MDVR-IOP,MDVR-APRTP,MDVR-PCAE&pwenc=1&_=1670310762696";
	public static final String AUDIO_URL = "http://{0}/devapi/v1/basic/systemparam?type=MDVR-DOSD-CHN,MDVR-RP,MDVR-MAIN,MDVR-AR,MDVR-ASP,MDVR-REDEV,MDVR-GSP,MDVR-SUBSTRNET-NEC&pwenc=1&_=1670318357486";
	public static final String ALARM_URL = "http://{0}/devapi/v1/basic/systemparam?type=MDVR-DSM,MDVR-SAP-UN,MDVR-APRTP,MDVR-MAIN,MDVR-IPCCTR-0,MDVR-PADAS,MDVR-REDEV&pwenc=1&_=1670413202482";
	public static final String COMMUNICATION_URL = "http://{0}/devapi/v1/basic/systemparam?type=MDVR-M3G,MDVR-GSP-LANT&pwenc=1&_=1675914066699";
	public static final String INTELLIGENCE_URL = "http://{0}/devapi/v1/basic/systemparam?type=MDVR-DSM,MDVR-IAP,MDVR-MAIN,MDVR-GSP&pwenc=1&_=1682566463075";
	public static final String REGISTRATION_URL = "http://{0}/devapi/v1/basic/systemconfig?_=1693441220835";
	public static final String WIRE_URL = "http://{0}/devapi/v1/basic/systemparam?type=MDVR-ETHERNET,MDVR-KEYS,MDVR-PORT&pwenc=1&_=1693362135668";

	public static final String ALL_FORMAT = "http://{0}/devapi/v2/factoryformat?_=1706685650223";
	public static final String DEV_INFO ="http://{0}/devapi/v1/basic/storagedevinfo?_=1706685650225";

	public static final String LOGIN_URL_V1 = "http://{0}/logincheck.rsp?type=1";
	public static final String URL_V1 = "http://{0}/getparameter.json";
	public static final String REQ_SERVER_V1 = "{\"MODULE\":\"CONFIGMODEL\",\"SESSION\":\"FROMIE\",\"OPERATION\":\"GET\",\"PARAMETER\":{\"MDVR\":{\"MCMS\":{\"SP\":[{\"EN\":\"?\",\"CP\":\"?\",\"NWT\":\"?\",\"CS\":\"?\",\"CPORT\":\"?\",\"CUPORT\":\"?\",\"MS\":\"?\",\"MPORT\":\"?\",\"MUPORT\":\"?\"},{\"EN\":\"?\",\"CP\":\"?\",\"NWT\":\"?\",\"CS\":\"?\",\"CPORT\":\"?\",\"CUPORT\":\"?\",\"MS\":\"?\",\"MPORT\":\"?\",\"MUPORT\":\"?\"},{\"EN\":\"?\",\"CP\":\"?\",\"NWT\":\"?\",\"CS\":\"?\",\"CPORT\":\"?\",\"CUPORT\":\"?\",\"MS\":\"?\",\"MPORT\":\"?\",\"MUPORT\":\"?\"},{\"EN\":\"?\",\"CP\":\"?\",\"NWT\":\"?\",\"CS\":\"?\",\"CPORT\":\"?\",\"CUPORT\":\"?\",\"MS\":\"?\",\"MPORT\":\"?\",\"MUPORT\":\"?\"},{\"EN\":\"?\",\"CP\":\"?\",\"NWT\":\"?\",\"CS\":\"?\",\"CPORT\":\"?\",\"CUPORT\":\"?\",\"MS\":\"?\",\"MPORT\":\"?\",\"MUPORT\":\"?\"},{\"EN\":\"?\",\"CP\":\"?\",\"NWT\":\"?\",\"CS\":\"?\",\"CPORT\":\"?\",\"CUPORT\":\"?\",\"MS\":\"?\",\"MPORT\":\"?\",\"MUPORT\":\"?\"}],\"M\":\"?\",\"H\":\"?\"},\"PSI\":{\"PI\":[{\"GPS\":{\"DTI\":\"?\"}},{\"GPS\":{\"DTI\":\"?\"}},{\"GPS\":{\"DTI\":\"?\"}},{\"GPS\":{\"DTI\":\"?\"}},{\"GPS\":{\"DTI\":\"?\"}},{\"GPS\":{\"DTI\":\"?\"}}]}}}}";
	public static final String REQ_PORT_V1 = "{\"MODULE\":\"CONFIGMODEL\",\"SESSION\":\"FROMIE\",\"OPERATION\":\"GET\",\"PARAMETER\":{\"MDVR\":{\"PSS\":{\"SP\":\"?\",\"TSK\":\"?\",\"LPS\":\"?\",\"LPDS\":\"?\",\"LPWM\":\"?\",\"LPDT\":\"?\",\"CKF\":\"?\",\"CKT\":\"?\"},\"PIS\":{\"PBT\":{\"LSEN\":\"?\"}}}}}";
	public static final String REQ_PORTALARM_V1 = "{\"MODULE\":\"CONFIGMODEL\",\"SESSION\":\"FROMIE\",\"OPERATION\":\"GET\",\"PARAMETER\":{\"MDVR\":{\"IOP\":\"?\",\"SSP\":{\"DDS\":\"?\"}}}}";
	public static final String REQ_AUDIO_V1 = "{\"MODULE\":\"CONFIGMODEL\",\"SESSION\":\"FROMIE\",\"OPERATION\":\"GET\",\"PARAMETER\":{\"MDVR\":{\"DOSD\":{\"CHN\":[\"?\",\"?\",\"?\",\"?\",\"?\",\"?\"]},\"MAIN\":[{\"VEN\":\"?\",\"RST\":\"?\",\"FR\":\"?\",\"QLT\":\"?\",\"AEN\":\"?\",\"FT\":\"?\",\"AFR\":\"?\",\"ALT\":\"?\",\"BRM\":\"?\",\"AMT\":\"?\",\"AST\":\"?\",\"USE\":\"?\",\"NOSE\":\"?\",\"RAG\":\"?\",\"ECT\":\"?\"},{\"VEN\":\"?\",\"RST\":\"?\",\"FR\":\"?\",\"QLT\":\"?\",\"AEN\":\"?\",\"FT\":\"?\",\"AFR\":\"?\",\"ALT\":\"?\",\"BRM\":\"?\",\"AMT\":\"?\",\"AST\":\"?\",\"USE\":\"?\",\"NOSE\":\"?\",\"RAG\":\"?\",\"ECT\":\"?\"},{\"VEN\":\"?\",\"RST\":\"?\",\"FR\":\"?\",\"QLT\":\"?\",\"AEN\":\"?\",\"FT\":\"?\",\"AFR\":\"?\",\"ALT\":\"?\",\"BRM\":\"?\",\"AMT\":\"?\",\"AST\":\"?\",\"USE\":\"?\",\"NOSE\":\"?\",\"RAG\":\"?\",\"ECT\":\"?\"},{\"VEN\":\"?\",\"RST\":\"?\",\"FR\":\"?\",\"QLT\":\"?\",\"AEN\":\"?\",\"FT\":\"?\",\"AFR\":\"?\",\"ALT\":\"?\",\"BRM\":\"?\",\"AMT\":\"?\",\"AST\":\"?\",\"USE\":\"?\",\"NOSE\":\"?\",\"RAG\":\"?\",\"ECT\":\"?\"},{\"VEN\":\"?\",\"RST\":\"?\",\"FR\":\"?\",\"QLT\":\"?\",\"AEN\":\"?\",\"FT\":\"?\",\"AFR\":\"?\",\"ALT\":\"?\",\"BRM\":\"?\",\"AMT\":\"?\",\"AST\":\"?\",\"USE\":\"?\",\"NOSE\":\"?\",\"RAG\":\"?\",\"ECT\":\"?\"},{\"VEN\":\"?\",\"RST\":\"?\",\"FR\":\"?\",\"QLT\":\"?\",\"AEN\":\"?\",\"FT\":\"?\",\"AFR\":\"?\",\"ALT\":\"?\",\"BRM\":\"?\",\"AMT\":\"?\",\"AST\":\"?\",\"USE\":\"?\",\"NOSE\":\"?\",\"RAG\":\"?\",\"ECT\":\"?\"}],\"RP\":{\"RCP\":[{\"RM\":\"?\",\"RSI\":\"?\"},{\"RM\":\"?\",\"RSI\":\"?\"},{\"RM\":\"?\",\"RSI\":\"?\"},{\"RM\":\"?\",\"RSI\":\"?\"},{\"RM\":\"?\",\"RSI\":\"?\"},{\"RM\":\"?\",\"RSI\":\"?\"}]},\"REDEV\":\"?\",\"AR\":{\"HID\":\"?\"}}}}";
	public static final String REQ_STANDARD_V1 = "{\"MODULE\":\"CONFIGMODEL\",\"SESSION\":\"FROMIE\",\"OPERATION\":\"GET\",\"PARAMETER\":{\"MDVR\":{\"GSP\":{\"VSA\":\"?\"},\"RP\":{\"MP\":[{\"OT\":\"?\",\"OVD\":\"?\",\"OLD\":\"?\"},{\"OT\":\"?\"}],\"PRE\":\"?\",\"PRS\":\"?\",\"RCP\":\"?\"}}}}";
	public static final String REQ_ALARM_V1 = "{\"MODULE\":\"CONFIGMODEL\",\"SESSION\":\"FROMIE\",\"OPERATION\":\"GET\",\"PARAMETER\":{\"MDVR\":{\"PIS\":{\"PBT\":{\"TSAP\":{\"ALCS\":[{\"RPLT\":\"?\",\"BPLT\":\"?\",\"RAWN\":\"?\",\"ALNK\":\"?\"},{\"RPLT\":\"?\",\"BPLT\":\"?\",\"RAWN\":\"?\",\"ALNK\":\"?\"},{\"RPLT\":\"?\",\"BPLT\":\"?\",\"RAWN\":\"?\",\"ALNK\":\"?\"},{\"RPLT\":\"?\",\"BPLT\":\"?\",\"RAWN\":\"?\",\"ALNK\":\"?\"}]},\"SBAO\":\"?\",\"DCY\":\"?\",\"FNP\":\"?\",\"HUANWEI\":{\"VSLK\":\"?\"}}},\"DSM\":{\"DSMA\":\"?\",\"CTOD\":\"?\",\"OFCE\":\"?\",\"YPLD\":\"?\"},\"GSP\":\"?\",\"SAP\":{\"UN\":\"?\"},\"PVSAS\":\"?\"}}}";
	public static final String REQ_COMMUNICATION_V1 = "{\"MODULE\":\"CONFIGMODEL\",\"SESSION\":\"FROMIE\",\"OPERATION\":\"GET\",\"PARAMETER\":{\"MDVR\":{\"M3G\":{\"MP\":{\"NM\":\"?\",\"APN\":\"?\",\"UN\":\"?\",\"PW\":\"?\",\"AN\":\"?\",\"PM\":\"?\"},\"M4G\":{\"NM\":\"?\",\"APN\":\"?\",\"UN\":\"?\",\"PW\":\"?\",\"AN\":\"?\",\"PM\":\"?\"},\"M3M\":{\"AT\":\"?\",\"TN1\":\"?\",\"TN2\":\"?\",\"TN3\":\"?\"}}}}}";



	/**
	 * 初始化字典数据
	 * @return
	 */
	public static List<DictDto> initDict() {
		List<DictDto> lists = new ArrayList<DictDto>();
		
		/**********server相关**********/
		//协议类型
		DictDto servercp = new DictDto();
		servercp.setType("server-cp");
		Map<Integer,Object> servercpmap = new HashMap<Integer,Object>();
		servercpmap.put(0, "N9M");
		servercpmap.put(2, "808");
		servercpmap.put(3, "运维");
		servercpmap.put(1, "IC卡");
		servercp.setMap(servercpmap);
		lists.add(servercp);
		
		//使用网络
		DictDto servernwt = new DictDto();
		servernwt.setType("server-nwt");
		Map<Integer,Object> servernwtmap = new HashMap<Integer,Object>();
		servernwtmap.put(0, "有线网络");
		servernwtmap.put(1, "WIFI");
		servernwtmap.put(2, "通讯模块1");
		servernwtmap.put(3, "通讯模块2");
		servernwtmap.put(4, "自适应");
		servernwt.setMap(servernwtmap);
		lists.add(servernwt);
		
		
		/**********串口相关**********/
		//外设
		DictDto portft = new DictDto();
		portft.setType("port-ft");
		Map<Integer,Object> portftmap = new HashMap<Integer,Object>();
		portftmap.put(0, "无");
		portftmap.put(1, "扩展");
		portftmap.put(7, "485总线");
		portftmap.put(8, "GPS数据");
		portftmap.put(150, "KEYBOARD");
		portft.setMap(portftmap);
		lists.add(portft);
		
		//波特率
		DictDto portbr = new DictDto();
		portbr.setType("port-br");
		Map<Integer,Object> portbrmap = new HashMap<Integer,Object>();
		portbrmap.put(0, "4800");
		portbrmap.put(1, "9600");
		portbrmap.put(2, "19200");
		portbrmap.put(3, "38400");
		portbrmap.put(4, "56000");
		portbrmap.put(5, "57600");
		portbrmap.put(6, "115200");
		portbrmap.put(7, "2400");
		portbrmap.put(8, "28800");
		portbr.setMap(portbrmap);
		lists.add(portbr);
		
		/**AI报警**/
		//灵敏度
		DictDto alarmesst = new DictDto();
		alarmesst.setType("alarm-esst");
		Map<Integer,Object> alarmesstmmap = new HashMap<Integer,Object>();
		alarmesstmmap.put(1, "低");
		alarmesstmmap.put(2, "中");
		alarmesstmmap.put(3, "高");
		alarmesstmmap.put(4, "自定义");
		alarmesst.setMap(alarmesstmmap);
		lists.add(alarmesst);
		
		//判断条件
		DictDto alarmspon = new DictDto();
		alarmspon.setType("alarm-spone");
		Map<Integer,Object> alarmsponmmap = new HashMap<Integer,Object>();
		alarmsponmmap.put(0, "左右+上下看");
		alarmsponmmap.put(1, "左右看");
		alarmsponmmap.put(2, "上下看");
		alarmspon.setMap(alarmsponmmap);
		lists.add(alarmspon);
		
		//分心程度
		DictDto alarmalarmspthree = new DictDto();
		alarmalarmspthree.setType("alarm-spthree");
		Map<Integer,Object> alarmalarmspthreemap = new HashMap<Integer,Object>();
		alarmalarmspthreemap.put(1, "轻微");
		alarmalarmspthreemap.put(2, "一般");
		alarmalarmspthreemap.put(3, "严重");
		alarmalarmspthree.setMap(alarmalarmspthreemap);
		lists.add(alarmalarmspthree);
		
		
		/**********串口报警相关**********/
		//触发条件源
		DictDto portalarmtm = new DictDto();
		portalarmtm.setType("portalarm-tm");
		Map<Integer,Object> portalarmtmmap = new HashMap<Integer,Object>();
		portalarmtmmap.put(0, "电平");
		portalarmtmmap.put(1, "脉冲");
		portalarmtm.setMap(portalarmtmmap);
		lists.add(portalarmtm);
		
		//触发条件
		DictDto portalarmel = new DictDto();
		portalarmel.setType("portalarm-el");
		Map<Integer,Object> portalarmelmap = new HashMap<Integer,Object>();
		portalarmelmap.put(0, "低电平");
		portalarmelmap.put(1, "高电平");
		portalarmel.setMap(portalarmelmap);
		lists.add(portalarmel);
		
		/*********音频相关**********/
		// 分辨率
		DictDto audiorst = new DictDto();
		audiorst.setType("audio-rst");
		Map<Integer,Object> audiorstmap = new HashMap<Integer,Object>();
		audiorstmap.put(0, "CIF");
		audiorstmap.put(1, "HD1");
		audiorstmap.put(2, "D1");
		audiorstmap.put(6, "720P");
		audiorstmap.put(7, "1080P");
		audiorstmap.put(11, "WCIF");
		audiorstmap.put(12, "WHD1");
		audiorstmap.put(13, "WD1(960H)");
		audiorstmap.put(14, "960P");
		audiorst.setMap(audiorstmap);
		lists.add(audiorst);
		
		// 帧率
		DictDto audiofr = new DictDto();
		audiofr.setType("audio-fr");
		Map<Integer,Object> audiofrmap = new HashMap<Integer,Object>();
		for(int i=1;i<31;i++) {
			audiofrmap.put(i, String.valueOf(i));
		}
		audiofr.setMap(audiofrmap);
		lists.add(audiofr);
		
		
		// 画质
		DictDto audioqlt = new DictDto();
		audioqlt.setType("audio-qlt");
		Map<Integer,Object> audioqltmap = new HashMap<Integer,Object>();
		for(int i=1;i<8;i++) {
			audioqltmap.put(i, String.valueOf(i));
		}
		audioqlt.setMap(audiofrmap);
		lists.add(audioqlt);
		
		// 录像方式
		DictDto audiorm = new DictDto();
		audiorm.setType("audio-rm");
		Map<Integer,Object> audiormmap = new HashMap<Integer,Object>();
		audiormmap.put(0, "开机录像");
		audiormmap.put(1, "定时录像");
		audiormmap.put(2, "报警录像");
		audiorm.setMap(audiormmap);
		lists.add(audiorm);
		
		// 录音
		DictDto audioaen = new DictDto();
		audioaen.setType("audio-aen");
		Map<Integer,Object> audioaenmap = new HashMap<Integer,Object>();
		audioaenmap.put(0, "不录音");
		audioaenmap.put(1, "录音");
		audioaen.setMap(audioaenmap);
		lists.add(audioaen);
		
		//音频编码格式
		DictDto audioat= new DictDto();
		audioat.setType("audio-at");
		Map<Integer,Object> audioatmap = new HashMap<Integer,Object>();
		audioatmap.put(0, "G711A");
		audioatmap.put(1, "G711U");
		audioatmap.put(2, "ADPCM");
		audioat.setMap(audioatmap);
		lists.add(audioat);

		//旋转角度Rotation angle
		DictDto rotationAngle= new DictDto();
		rotationAngle.setType("rotation-angle");
		Map<Integer,Object> rotationtmap = new HashMap<Integer,Object>();
		rotationtmap.put(0, "0度");
		rotationtmap.put(1, "90度");
		rotationtmap.put(2, "180度");
		rotationtmap.put(3, "270度");
		rotationAngle.setMap(rotationtmap);
		lists.add(rotationAngle);
		return lists;
	}
}
